package com.cipe.cmrs.controllers;

import java.io.Serializable;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import com.cipe.cmrs.model.User;


public class BaseController implements Serializable {

	private static final long serialVersionUID = -4933050612370312999L;
	
	public Integer getUserId(HttpSession session){
		return (Integer) session.getAttribute(User.LOGGED_IN_USER_KEY);
	}
	
	public Integer getUserId(HttpServletRequest request){
		return (Integer) request.getSession().getAttribute(User.LOGGED_IN_USER_KEY);
	}
	
}
